<template>
  <!-- calc() 能计算的计算表达式里，计算符号两边要有空格
  default-active 高亮
  default-opends 默认展开-->
  <!--  <el-menu
        class="el-menu-vertical-demo"
        :default-active="$route.path"
        router>-->

  <el-menu
      class="el-menu-vertical-demo"
      :default-active=path
      router
  >

    <el-sub-menu index="/1">

      <template #title>
        <el-icon>
          <platform/>
        </el-icon>
        <span>科研论文管理</span>
      </template>
      <el-menu-item index="/addPaper">
              <span
                  style="text-decoration: none; ">论文录入
              </span>
      </el-menu-item>
      <el-menu-item index="/SearchPaper">
              <span
                  style="text-decoration: none; ">论文列表
              </span>
      </el-menu-item>
    </el-sub-menu>

    <el-sub-menu index="/2">

      <template #title>
        <el-icon>
          <reading/>
        </el-icon>
        <span>科研论著管理</span>
      </template>
      <el-menu-item index="/addTreatise">
              <span
                  style="text-decoration: none;  ">论著录入
              </span>
      </el-menu-item>
      <el-menu-item index="/searchTreatise">
              <span
                  style="text-decoration: none;  ">论著列表
              </span>
      </el-menu-item>
    </el-sub-menu>
    <el-sub-menu index="/3">
      <template #title>
        <el-icon>
          <files/>
        </el-icon>
        科研项目管理
      </template>
      <el-menu-item index="/additem">
              <span
                  style="text-decoration: none;  ">项目录入
              </span>
      </el-menu-item>
      <el-menu-item index="/searchitem">
        项目列表
      </el-menu-item>
    </el-sub-menu>
    <el-sub-menu index="/4">
      <template #title>
        <el-icon>
          <briefcase/>
        </el-icon>
        科研成果管理
      </template>
      <el-menu-item index="/addAchieve">科研成果录入</el-menu-item>
      <el-menu-item index="/searchAchieve">科研成果列表</el-menu-item>
    </el-sub-menu>
    <el-sub-menu index="/5">
      <template #title>
        <el-icon>
          <trophy/>
        </el-icon>
        科研奖励管理
      </template>
      <el-menu-item index="/addReward">科研奖励录入</el-menu-item>
      <el-menu-item index="/searchReward">科研奖励列表</el-menu-item>
    </el-sub-menu>

    <el-sub-menu index="/9">
      <template #title>
        <el-icon>
         <scale-to-original />
        </el-icon>
        学报论文库
      </template>
      <el-menu-item index="/addNewspaper">学报论文录入</el-menu-item>
      <el-menu-item index="/searchNewspaper">学报论文列表</el-menu-item>
    </el-sub-menu>

    <el-sub-menu index="/6">
      <template #title>
        <el-icon>
          <opportunity/>
        </el-icon>
        科研专利管理
      </template>
      <el-menu-item index="/addPatent">科研专利录入</el-menu-item>
      <el-menu-item index="/searchPatent">科研专利列表</el-menu-item>
    </el-sub-menu>

    <el-sub-menu index="/7">
      <template #title>
        <el-icon>
          <user-filled/>
        </el-icon>
        职工管理
      </template>
      <el-menu-item index="/addUser">
              <span
                  style="text-decoration: none; ">职工信息录入
              </span>
      </el-menu-item>
      <el-menu-item index="/searchUser">
              <span
                  style="text-decoration: none; ">职工信息列表
              </span>
      </el-menu-item>
    </el-sub-menu>

    <el-sub-menu index="/8">
      <template #title>
        <el-icon>
          <avatar/>
        </el-icon>
        个人中心管理
      </template>
      <el-menu-item index="/personalCenter">登录信息修改</el-menu-item>
    </el-sub-menu>


  </el-menu>
</template>

<script>
import {
  Platform, Reading, Files, Trophy, Briefcase, Opportunity,
  Avatar, UserFilled,ScaleToOriginal,
  Setting
} from '@element-plus/icons'

export default {
  components: {
    Platform,
    ScaleToOriginal,
    Reading,
    Files,
    Trophy,
    Briefcase,
    Opportunity,
    Avatar,
    UserFilled,
    Setting
  },
  name: "",
  data() {
    return {
      user: {},
      path: this.$route.path, // 设置默认高亮的菜单为当前路由
    }
  },
  created() {
  }
}
</script>

<style scoped>

</style>
